package palmtop.com.palmtop.activity;

import android.os.Bundle;

import com.beardedhen.androidbootstrap.AwesomeTextView;

import net.grandcentrix.tray.AppPreferences;

import butterknife.BindView;
import butterknife.ButterKnife;
import palmtop.com.palmtop.R;

public class MyMessageActivity extends BaseActivity {

    @BindView(R.id.name)
    AwesomeTextView name;
    @BindView(R.id.loginnanme)
    AwesomeTextView loginnanme;
    @BindView(R.id.character)
    AwesomeTextView character;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_message, "我的信息", 1);
        MyApplication app = (MyApplication) getApplication();
        app.addActivityList(MyMessageActivity.this);
        ButterKnife.bind(this);
        AppPreferences pref = new AppPreferences(MyMessageActivity.this);
        String loginname1 = pref.getString("loginname", "");
        String name1 = pref.getString("name", "");
        String role_id = pref.getString("role_id", "");

        loginnanme.setText(loginname1);
        name.setText(name1);
        if(role_id.equals("73006b03b7f447bf953d065462e5b1ac")){
            character.setText("上级领导");
        }

        if(role_id.equals("d18ac0ef29ee477f8e3dd214245a1de5")){
            character.setText("社区民警");
        }

        if(role_id.equals("1f515845ed214961aef8a0bc6646cf2d")){
            character.setText("网格员");
        }
    }
}
